package com.example.manualManagement.controller.user.account;

import com.example.manualManagement.service.user.account.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
public class LoginCtrl {
    @Autowired
    private LoginService loginService;

    @PostMapping("manage/token")
    public Map<String, String> getToken(@RequestBody Map<String, String> map){
        String userName = map.get("userName");
        String userPassword = map.get("userPassword");
        return loginService.getToken(userName, userPassword);
    }
}
